]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
NetworkMenu: fix parameters to _findConnection
authorGiovanni Campagna <gcampagna@src.gnome.org>
Thu, 31 Mar 2011 16:03:50 +0000 (18:03 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Sat, 2 Apr 2011 18:35:46 +0000 (20:35 +0200)
NMDevice._findConnection expects an uuid as parameter, but
checkConnection was passing a NMConnection object. This caused
exists to be always false, thus the connection was added again every
time the 'updated' signal was emitted.

https://bugzilla.gnome.org/show_bug.cgi?id=645702

js/ui/status/network.js

index bd57ed7592cebc59e97733e71119fcc280a70c00..ffcab09b24b08e95458713c92dd1d6eea2c068d7 100644 (file)
@@ -424,7 +424,7 @@ NMDevice.prototype = {
     },
 
     checkConnection: function(connection) {
-        let exists = this._findConnection(connection) != -1;
+        let exists = this._findConnection(connection._uuid) != -1;
         let valid = this.connectionValid(connection);
         if (exists && !valid)
             this.removeConnection(connection);